/*
 * @Author: 15097322811 1447934599@qq.com
 * @Date: 2024-01-11 10:14:46
 * @LastEditors: 15097322811 1447934599@qq.com
 * @LastEditTime: 2024-02-04 18:10:45
 * @Description:
 */
import {
	box_view
} from "@/utils/keyControl.js";
// js文件中
import Vue from 'vue'
import VueI18n from 'vue-i18n'
import messages from '@/locale/index.js'

Vue.use(VueI18n) // 这里一行是必须加的。
// 在该js文件中，单独注册一个i18n实例并引入语言文件
const i18n = new VueI18n({
  locale: uni.getLocale(),
  messages: messages
})

let list = [{
		id: 0,
		iconPath: "https://v3mh6.oss-cn-beijing.aliyuncs.com/51api/tab1.png",
		selectedIconPath: "https://v3mh6.oss-cn-beijing.aliyuncs.com/51api/tab2.png",
		text: i18n.t("首页"),
		customIcon: false,
		pagePath: "/pages/tabBar/home",
	},
	{
		id: 1,
		iconPath: "https://v3mh6.oss-cn-beijing.aliyuncs.com/51api/tab3.png",
		selectedIconPath: "https://v3mh6.oss-cn-beijing.aliyuncs.com/51api/tab4.png",
		text: i18n.t("商城"),
		customIcon: false,
		pagePath: "/pages/tabBar/mall",
	},
	{
		id: 2,
		iconPath: "https://v3mh6.oss-cn-beijing.aliyuncs.com/51api/tab7.png",
		selectedIconPath: "https://v3mh6.oss-cn-beijing.aliyuncs.com/51api/tab8.png",
		text: i18n.t("仓库"),
		customIcon: false,
		pagePath: "/pages/tabBar/cangku",
	},
	{
		id: 3,
		iconPath: "https://v3mh6.oss-cn-beijing.aliyuncs.com/51api/tab9.png",
		selectedIconPath: "https://v3mh6.oss-cn-beijing.aliyuncs.com/51api/tab10.png",
		text: i18n.t("我的"),
		customIcon: false,
		pagePath: "/pages/tabBar/my",
	},
];

let tabbar = [];
if (box_view) {
	tabbar = list;
} else {
	tabbar = list.filter((item) => {
		return item.text != "盒子";
	});
}
export {
	tabbar
};